package com.cu.employmentmanagementsystem.service;

import com.cu.employmentmanagementsystem.dto.StudentVitaDTO;
import com.cu.employmentmanagementsystem.entity.Company;
import com.cu.employmentmanagementsystem.entity.RecruitInformation;
import com.cu.employmentmanagementsystem.entity.StudentVita;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;

/**
 * 公司信息表(Company)表服务接口
 *
<<<<<<< HEAD
 * @author zhangyong
 * @since 2024-07-02 14:00:06
=======
 * @author makejava
 * @since 2024-07-02 13:14:02
>>>>>>> origin/master
 */
public interface CompanyService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    public Company queryByCompanyId(Long id);
    public Company queryById(Long id);

    /**
     * 分页查询
     *
     * @param company 筛选条件
     * @param pageRequest      分页对象
     * @return 查询结果
     */
    Page<Company> queryByPage(Company company, PageRequest pageRequest);

    /**
     * 新增数据
     *
     * @param company 实例对象
     * @return 实例对象
     */
    Company insert(Company company);

    /**
     * 修改数据
     *
     * @param company 实例对象
     * @return 实例对象
     */
    Boolean update(Company company);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(Long id);

    List<Company> queryAllByCondition(Company company);
    List<RecruitInformation> queryRecruitments();

    List<StudentVitaDTO> queryResumesByRecruitmentId(Long recruitmentId);

    boolean acDeliveryStateByRecruitmentIdAndResumeId(Long recruitmentId,Long resumeId);

    boolean refuseDeliveryStateByRecruitmentIdAndResumeId(Long recruitmentId, Long resumeId);

    List<Company> getAllCompanies();
}
